from PyQt6.QtCore import QRectF
from PyQt6.QtWidgets import QTextBrowser

from gui.utils.size import WORLD_SIZE, RESOURCE_HEIGHT, ZONING_SIZE, MSG_WIDTH, MSG_HEIGHT, FILTER_HEIGHT


class PanelMessage(QTextBrowser):
    def __init__(self, parent=None):
        super().__init__(parent)
        h = MSG_HEIGHT / 2
        rect = QRectF(WORLD_SIZE, RESOURCE_HEIGHT + ZONING_SIZE + FILTER_HEIGHT + h, MSG_WIDTH, h)
        self.setGeometry(rect.toRect())
